{% extends "layout/base.html" %}
{% block content %}

<h1>Envoyer un message</h1>

<div id="btn_messages">
	<a class="btn_message_received" title="Messages recus - Fac by car - Co-voiturage UMLV" href="/messages/">Messages recus</a>
	<a class="btn_message_send" title="Messages envoyes - Fac by car - Co-voiturage UMLV" href="/sended_messages/">Messages envoyes</a>
</div>

<form id="mess_form" action="/reply_message/" method="post">
	<input type="hidden" name="recipient" id="{{ idm }}" value="{{ idm }}" />
	<!-- recup l'id de l'user ayant envoye le message pour remplacer "recipient" -->
	
	<!--<div class="fieldWrapper"> 
		<p><label>{{ form.recipient.label }} :</label> {{ form.recipient }}
		{% for error in form.recipient.errors %}<span class="error">{{ error }}</span>{% endfor %}</p>	
	</div>-->
	<div class="fieldWrapper"> 
		<p><label>{{ form.subject.label }} :</label> {{ form.subject }}
		{% for error in form.subject.errors %}<span class="error">{{ error }}</span>{% endfor %}</p>	
	</div>
	<div class="fieldWrapper"> 
		<p><label>{{ form.content.label }} :</label> {{ form.content }}
		{% for error in form.content.errors %}<span class="error">{{ error }}</span>{% endfor %}</p>	
	</div>

	<input type="submit" class="submit_search" value="Envoyer" />
</form>

{% endblock content %}
